home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PRINTER
/
PRINDIR8.ARJ
/
PRINDIR.DOC
< prev
next >
Wrap
Text File
|
1991-11-07
|
35KB
|
793 lines
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
TABLE OF CONTENTS
Introduction ............................................... page 2
Shareware Notice ........................................... page 2
Disclaimer ................................................. page 3
I. PRINDIR PROGRAM USE AND OPTIONS
Installing PRINDIR .................................... page 3
Command Line Parameters................................ page 3
Order of Installation ................................. page 4
Releasing PRINDIR ..................................... page 5
PRINDIR Popup Parameter Menu .......................... page 6
Status Box ............................................ page 6
Redirected Device ..................................... page 6
Device Destination .................................... page 6
Redirection Files ..................................... page 6
Invisible Mode ........................................ page 7
The PRINDIR Byte Count Indicator ...................... page 7
Important Notes ....................................... page 8
II. PRINMOD PROGRAM USE AND OPTIONS
Program Overview ...................................... page 8
Command Line Parameters ............................... page 8
Notes For Programmers ................................. page 9
III. PRINKEY PROGRAM
Program Usage ......................................... page 10
IV. PRINCOL PROGRAM
Program Usage ......................................... page 11
VI. TECHNICAL SUPPORT
Final Notes and Where to Get HELP! .................... page 11
Known Conflicts ....................................... page 11
PRINDIR Registration Form .................................. page 12
INTRODUCTION:
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
Welcome to Version 8.00 of PRINDIR, the BEST printer redirection
program available! PRINDIR is a TSR program that will allow you to
redirect the output of any standard COM or LPT port to any other COM
or LPT port, as well as to disk files and to the display. In
addition, PRINDIR allows you to specify the full path and file name
for disk file redirection, thus it is possible to redirect to any file
or logical device. The main program offers an easy to use Popup
Parameter Menu from which the user can quickly and easily set program
options. PRINDIR can make use of expanded and extended memory on
systems so equipped, making its conventional memory footprint even
smaller. PRINDIR also includes several small support utilities to
help you customize PRINDIR to meet your needs. PRINDIR is fast,
intuitive, easy to use, and can be utilized to solve many different
types of problems. Only your imagination will limit what you can do
with PRINDIR.
PRINDIR is a Shareware program written by Michael A. Hotz of J.M.
Allen Creations, and is user supported through Shareware registration.
Technical support is provided via phone, email, U.S. mail, or any
other means possible. Registered users are rewarded with very cheap
upgrades to any future version which is released after the version
they register. Users who register an older version after a newer
version has been released with be sent the latest version at no extra
cost.
SHAREWARE NOTICE:
The PRINDIR system, comprised of PRINDIR, PRINMOD PRINCOL, and
PRINKEY versions 8.00, this documentation, and any previous or later
versions of any of the above are all Copyright (c) 1989-1991 J.M.
Allen Creations. All Rights Reserved by Michael A. Hotz. This
program is NOT public domain, it is released using the Shareware
concept. I invite you to use my software on a trial basis. If after
30 days, you find that this is an indispensable addition to your
utility entourage, I ask that you pay for this program by sending a
$20.00 registration fee to the author by using the registration form
included on the last page of this manual. You may also register by
phone using a valid VISA or MASTERCARD. Registered users will be
allowed 25% upgrades on any future Shareware versions of PRINDIR.
Registration allows you to use PRINDIR on any number of computers at a
single location. You are required to register a copy of PRINDIR for
each location where it will be used on one or more machines.
Registered users are invited to upgrade to the latest version of
PRINDIR for only $5.00. Registration assures you of 25 percent
upgrades for any future shareware versions of the program, unlimited
technical support, and you will have a clear conscience knowing you
have not stolen this software, but rather paid a very modest fee for
the continued legal use of PRINDIR.
Page - 2
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
This program may be freely distributed for others evaluation as
long as no fee is charged, with the exception of modest disk, shipping
and handling charges. Any person who uses this product agrees to the
terms of the Shareware, Copyright, and Disclaimer notices contained
herein. If this system is distributed, only the original archive
distributed by J.M. Allen Creations should be used, and it should not
be modified in ANY WAY! This will allow users who fear they may have
obtained a patched, or otherwise modified version of the program to
verify the integrity of the program by calling J.M. Allen Creations
with the archive checksum information.
You MAY NOT disassemble, reverse engineer, hack, change, modify,
alter, mutate, refashion, vary, or catalyze any of these programs or
documentation in any way, manner shape or form.
DISCLAIMER:
Michael A. Hotz, nor J.M. Allen Creations, nor any person or entity
affiliated with either, will assume any responsibility for any
situation which occurs as a result, be it direct, or indirect, of the
use of any of these programs. THE USER ASSUMES ALL RISK WHICH MAY BE
ASSOCIATED WITH THE USE OF THESE PROGRAMS. There are no warrantees
whatsoever, expressed or implied, as to the usefulness or
effectiveness of this system for any particular purpose. This
software is sold as is, and is not guaranteed to work on any
particular machine, or under any particular hardware or software
configuration. All of the programs have been tested on my hardware
under numerous configurations to perform as described in this
documentation. Use of this software in any way constitutes IMMEDIATE
acceptance of these terms by the user.
INSTALLING PRINDIR:
PRINDIR should be installed on a system running version 2.0 of
DOS or greater. It should be installed at the command line, or in a
batch file, but should not be installed while you are shelled to DOS
from inside another program. The program requires one of three
command line switches to be installed, or one to be released. The
installation switches control what type of memory PRINDIR will use for
a buffer when redirecting to disk files.
COMMAND LINE PARAMETERS:
prindir /c
Installing PRINDIR with the /c parameter will cause PRINDIR to
allocate 32k of CONVENTIONAL memory for redirection to disk files.
prindir /x
Installing PRINDIR with the /x parameter will cause PRINDIR to
allocate 32k of EXTENDED memory for redirection to disk files. You
must have an XMM (Extended Memory Manager) such as HIMEM.SYS
Page - 3
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
installed, and sufficient extended memory in order to use extended
memory with PRINDIR.
prindir /a
Installing PRINDIR with the /a parameter will cause PRINDIR to
allocate 32k of EXPANDED memory for redirection to disk files. You
must have an EMM (Expanded Memory Manager) and appropriate hardware
installed, and sufficient expanded memory available in order to use
expanded memory with PRINDIR.
ORDER OF INSTALLATION FOR TSR PROGRAMS:
The order of installation of TSR programs has been a subject of
some confusion in the industry. This can be especially confusing when
two programs are installed for the same device to do different things.
While I certainly can't speak for all TSR programs, the majority of
properly written TSR programs will follow these basic guidelines.
The easiest way to remember is to know that the last TSR program
installed will generally take control of the system before any others
installed before it. This is because TSR programs function based on
their ability to intercept interrupts. The last program to intercept
an interrupt is the first to receive control when that interrupt
occurs. It is then the responsibility of that program to be sure any
other programs installed before it has an opportunity to receive that
same interrupt. Interrupts are simply a way for a device to get the
attention of the system when they need it's services. This way, the
system doesn't waste time asking or polling each device to see if it
needs to be serviced. Under this scenario, an interrupt handler does
its processing, chaining to the next handler as required.
Suppose you have a print spooler installed in your system, and
you want to be able to use PRINDIR without it interfering with your
spooler. The procedure is simple. Install PRINDIR last. If PRINDIR
is installed last, it is first to receive control every time a
character is printed. PRINDIR then evaluates it's current setup. If
you are redirecting to a disk file, PRINDIR puts the byte in it's
internal buffer, and the spooler never knows about the byte. If
PRINDIR is in invisible mode, PRINDIR will pass the data on untouched
to the next program, in this case, the print spooler, which then does
with the data what it is supposed to, and so on.
In another situation, you may have a program installed to change
all printed data to upper case. If PRINDIR is installed after this
program, and is set for invisible mode, printed data will be all
uppercase because PRINDIR passes the call untouched to the uppercase
program. If PRINDIR is redirecting to disk file, the data redirected
to disk WILL NOT be uppercase because PRINDIR deals with the data
before the uppercase program gets a chance.
Page - 4
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
While neither of the above scenarios are wrong, they do
demonstrate that the order of installation can be a key factor in
getting different programs to work together to ultimately produce the
results you want. This logic may seem simple when PRINDIR is
redirecting to a file or the screen, but you are probably wondering
what happens when PRINDIR is redirecting to another LPT or COM port.
The answer becomes less clear, but a basic rule always applies. In
all modes except invisible mode, the original call to the redirected
device is thrown away by PRINDIR, and the data is then directed to the
proper device by a new call. PRINDIR does this automatically, and
none of the other devices or programs know what is going on.
Since I said that was the rule, then we must have an exception,
which is this. Setting the device destination the same as the
redirected device is functionally equivalent to invisible mode.
Now for a quick quiz to test your understanding. PRINDIR is
installed and is redirecting LPT1 to LPT3. PRINDIR was installed
BEFORE cswitch, a fictional program which toggles upper case to lower
case and lower to upper on LPT1. Suppose you are running a program
which is printing on LPT1. Where would the data be printed, and what
will it look like?
If you said the data will be printed on LPT3 you are right! If
you said the printing will be case toggled you are even more right!
If you know this is because cswitch case toggled the data and then
passed it on to PRINDIR which redirected it to LPT3, you are all
right! If you were wrong, and don't know why, you may want to read
this section again. Remember that in this case, PRINDIR was installed
first, and cswitch last. cswitch got control first when data was
printed, it intercepted and case toggled the data printed to LPT1, and
then sent it on to LPT1 which PRINDIR was intercepting, and printed it
on LPT3.
Just for the record, no matter what the destination in this case,
the output would have been case toggled because cswitch was installed
last, and deals with the data first.
UNLOADING OR RELEASING PRINDIR:
To unload PRINDIR, run the program from the command line or a batch
file after it has been installed with the /r switch, and the program
will be released. If one of the interrupts PRINDIR takes over while
it is installed is changed while it is resident, PRINDIR will not be
able to unload until the affected interrupt is restored. If PRINDIR
cannot unload safely, it will display a message to this effect and
remain resident. At this point you may want to unload the offending
program, and attempt to release PRINDIR again. Any data in the disk
buffer will be written automatically before the program releases.
Page - 5
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
PRINDIR POPUP PARAMETER MENU:
The popup parameter menu is your interface with the PRINDIR
program. From this small popup menu, you can set many different
parameters, and control just how PRINDIR works. The following
paragraphs summarize the different configuration settings and
information displays. The default keystroke to pop up PRINDIR
is ALT + P (Hold the ALT key and press P).
STATUS BOX:
The status box is located near the top of the Popup Parameter
Menu. This box contains several lines of information which tell you
about the current configuration of PRINDIR.
REDIRECTING:
This field indicates which device PRINDIR is currently
redirecting. Any output sent to this device will be intercepted by
PRINDIR, and redirected to the appropriate destination based on the
DESTINATION field. PRINDIR defaults to redirect LPT1 when it is
installed. You can very easily change this setting using the 1
through 7 keys on the top of your keyboard or the PRINMOD program
supplied with PRINDIR. When you press one of these keys, this field
in the status box will be updated instantly to reflect your changes.
This setting will remain in effect until you change it again through
the popup parameter screen, or the PRINMOD program.
DESTINATION:
This field indicates which device PRINDIR is currently writing
redirected output to. Any data written to the intercepted device is
intercepted by PRINDIR, and written to this destination device.
PRINDIR defaults to INVIS (invisible) when installed. This means that
if PRINDIR is installed for LPT1, anything written to LPT1 will go
directly to LPT1 without PRINDIR intervention. You can very easily
change this setting using the A through I and M keys on your keyboard.
Each key will change the destination device, and this field in the
status box will be updated instantly to reflect the current selection.
This setting will remain in effect until you change it again through
the popup parameter screen, or the PRINMOD program.
REDIRECTION FILES:
There are two menu choices which control the redirection files
PRINDIR uses.
The K key will allow you to edit the file path field.
The L key will allow you to edit the file name field.
The most important concept to grasp about editing these fields is
that PRINDIR simply adds them together when it attempts to write to a
file. The following correct examples should help you:
Page - 6
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
File Path = C:\
File Name = PRINDIR.DAT
Full File Path = C:\PRINDIR.DAT
File Path = C:\SYSTEM\SCRNDUMP\
File Name = TODAY.DAT
Full File Path = C:\SYSTEM\SCRNDUMP\TODAY.DAT
Now suppose we have these to examples:
File Path = C:\TEST\
File Name = \JUNK.DAT
Full File Path = C:\TEST\\JUNK.DAT (** WRONG! **)
File Path = C:\STUFF
File Name = DIRDUMP.DAT
Full File Path = C:\STUFFDIRDUMP.DAT (** WRONG! **)
In the first wrong example, we have a backslash at the end of the path
as well as at the beginning of the file, creating a full path name
with a double backslash in the middle. This won't produce the desired
results.
In the second example, we have no backslash separating the file path
and the file name, so again, we don't get the desired results.
Just remember that PRINDIR simply appends the file name to the path to
create the full file name.
You can feel safe that you will not loose data because PRINDIR will
never write over existing data. If the destination file you have
chosen already exists, PRINDIR will simply append any further data to
the end of the file, leaving the original data untouched. If the file
specified does not exist, PRINDIR will automatically create it.
INVISIBLE MODE:
When PRINDIR is in invisible mode, it appears transparent in that
it does not modify any data in any way. Invisible mode allows PRINDIR
to remain in memory without disturbing any printed data, waiting for
your commands at any time.
PRINDIR BYTE COUNT INDICATOR:
This display is a five digit counter that can be seen in the
upper right corner of the screen when key L, Toggle Byte Display, is
set to on or +. When the key is toggled to off, or -, the display
will not be seen. The current status of the byte display is indicated
by a + (plus sign) or - (minus sign) beside the words 'Toggle Byte
Display' in the popup parameter menu. The display shows the number of
bytes that are in the redirection buffer, and uses the same colors as
the parameter menu.
Page - 7
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
IMPORTANT NOTES:
Always remember that PRINDIR will only intercept one device at
any one time. Output to any other device will be untouched by
PRINDIR.
PRINDIR does not do any fancy tap dancing with the video display.
If you pop PRINDIR up on a graphics display, it will pop up, but you
more than likely won't be able to see it. You may even get garbage.
You can still set parameters by pressing the proper keys, but you
won't be able to see what you are doing. Since there are so many
types of display adapters and video modes any more, adding the code
and logic to deal with graphics displays would waste more memory than
would be practical at this point in time.
PRINDIR will automatically write any bytes in the disk buffer
before popup. This occurs to prevent problems with parts of files
being printed to parts of other files when doing file name changes.
PRINMOD PROGRAM OVERVIEW:
PRINMOD is a separate program to support changing resident
PRINDIR parameters from batch files, or at the command line, or even
from within other programs. PRINMOD will allow you to do this easily.
You simply run PRINMOD with the desired parameters. The parameters
can be any number from the list below, in any combination.
COMMAND LINE PARAMETERS:
prinmod /inv - Set PRINDIR to invisible mode
prinmod /lpt? - Set destination to printer (? = 1-3)
prinmod /com? - Set destination to com port (? = 1-4)
prinmod /scr - Set destination to the screen
prinmod /fil - Set destination to a disk file
prinmod /path=... - Set the file path to ... (maximum 41 chars)
prinmod /name=... - Set the file name to ... (maximum 41 chars)
prinmod /dump - Force PRINDIR to flush its buffer ASAP
prinmod /color??? - Change menu and status color (see PRINCOL)
prinmod /key??? - Change pop up hot key (see PRINKEY)
prinmod /dis? - Toggle byte display (? = 1 or 0)
prinmod /set? - Change redirected device (? = 1-7)
The device numbers for /set are as follows:
1 = LPT1 2 = LPT2 3 = LPT3
4 = COM1 5 = COM2 6 = COM3 7 = COM4
If you give an invalid argument, or PRINDIR is not installed, the
program will display a message indicating the situation.
Page - 8
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
NOTES FOR PROGRAMMERS:
You may easily incorporate support for changing resident PRINDIR
settings in your software through interrupt 7Ah. You can accomplish
this through standard software interrupt calls to PRINDIR. You simply
put the desired command in the specified registers, and issue the
software interrupt 7Ah.
AH = 00h - Set output to INVISIBLE MODE
AH = 01h - Set output to LPT-1
AH = 02h - Set output to LPT-2
AH = 03h - Set output to LPT-3
AH = 04h - Set output to COM-1
AH = 05h - Set output to COM-2
AH = 06h - Set output to COM-3
AH = 07h - Set Output to COM-4
AH = 08h - Set Output to SCRN
AH = 09h - Set Output to FILE
AH = 0Ah - Change File Path
ES:DI = Far pointer to new file path
CX = Length of new path
AH = 0Bh - Change File Name
ES:DI = Far pointer to new file name
CX = Length of new name
AH = 0Ch - Set Redirected Device
AL = 1,2,3,4,5,6, or 7 (see above)
AH = 0Dh - Force buffer to dump ASAP
AH = 0Eh - Set Display Color
AL = new color (see PRINCOL)
AH = 0Fh - Set Popup Hotkey
AL = scancode (see PRINKEY)
AH = 10h - Toggle Byte Display
AL = 1 or 0 (on or off)
Before issuing any of these commands, you should insure that version
8.00 of PRINDIR is installed. You can do this by first obtaining the
interrupt vector for interrupt 7Ah using DOS int 21h function 35h, or
with a compatible function in your high level language such as
getvect() in C. If you add two to the offset of the vector, you
should be able to read the null terminated string "PRINDIR 8.00." If
the interrupt vector for PRINDIR points to 3C85:08B0, then you should
be able to find "PRINDIR 8.00" at 3C85:08B2. Again, this is a null
terminated string, so the C string functions will work correctly,
however, make sure you understand which memory model you are in, and
what type of pointers you are dealing with, NEAR or FAR!!!! A pointer
to this address would obviously be a FAR pointer! If you are using a
small memory model in C, you may have to check for "PRINDIR 8.00" the
hard way:
Page - 9
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
NOTE: The following example is based on syntax and functions available
in the Borland line of C compilers, and thus may require modification
to work with different compilers from other vendors.
#include <stdio.h>
#include <dos.h>
char far *prindir;
void main(void)
{
prindir = (char far *)getvect(0x7A);
if ( (prindir[2] == 'P') &&
(prindir[3] == 'R') &&
(prindir[4] == 'I') &&
(prindir[5] == 'N') &&
(prindir[6] == 'D') &&
(prindir[7] == 'I') &&
(prindir[8] == 'R') &&
(prindir[9] == ' ') &&
(prindir[10] == '8') &&
(prindir[11] == '.') &&
(prindir[12] == '0') &&
(prindir[13] == '0') ) printf("PRINDIR is installed!\n");
else printf("PRINDIR is not resident!\n");
}
If you do not find "PRINDIR 8.00, then PRINDIR is not installed,
or a version other than 8.00 is resident. In either case, you should
not attempt these function calls, as the system may hang.
Finally, once you have determined through the method listed above
that version 8.00 of PRINDIR is loaded, you may call these functions
as listed above. They return 0 in the ax register when successful,
and any other value indicates some type of error. If you specify an
invalid function number in AH (ie: greater than 10h) PRINDIR will
simply ignore it and return an error code.
PRINKEY PROGRAM:
The PRINKEY program will allow you to press the key you wish to
use to popup the PRINDIR Popup Parameter Menu. The program will then
print the number you must use with the PRINMOD program using the /key
option. Remember that this does not change the keystroke permanently,
only while PRINDIR is installed, or until it is changed again with
PRINMOD. While you must use the ALT key in conjunction with the
hotkey to popup PRINDIR, you should NOT use the ALT key when running
this program.
Page - 10
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
PRINCOL PROGRAM:
The PRINCOL program will display all of the possible values for
the /color option of the PRINMOD program. Remember that this does not
change the color permanently, only while PRINDIR is installed, or
until it is changed again with PRINMOD. Please note that on some
displays such as EGA and VGA, other programs may turn off the
intensity bit of the text mode display. If you choose a color greater
than 127, you may get the blinking low intensity color instead of the
non-blinking high intensity color. It is generally recommended that
you stick with the lower 127 colors. PRINDIR always resets the
intensity bit when the Popup Parameter Menu is activated.
FINAL NOTES AND WHERE TO GET HELP:
I have put a great deal of work into this system, and I believe
PRINDIR is one of the best, safest, most versatile, and most reliable
programs of this nature that is available. If, however, you are
experiencing any problems, please don't hesitate to contact me. I
answer all customer support questions personally, and would be glad to
help you with any problems you may be having.
You may contact me at my full time place of employment from 9:00
a.m. until 5:00 p.m Monday through Friday at (419) 334-5204. IF YOU
CALL MY OFFICE, PLEASE ASK FOR ME BY NAME! I AM THE ONLY ONE WHERE I
WORK WHO CAN PROVIDE ANY INFORMATION ON MY SHAREWARE! After hours and
on weekends, you may call (419) 262-8322. This is a private mobile
phone, and if it is not answered, will forward to a voice mailbox
which I check as often as possible. If you leave a message on here, I
will usually get back to you the same day. You may also send me
Compuserve Mail at USER ID: 72200,1312, GEnie Mail at MAHOTZ, or
Internet mail at "72200.1312@compuserve.com". I normally try to check
these places daily.
Many of the features in PRINDIR have been added at the request of
other users. If you have ideas, suggestions, questions, comments, or
criticism, please contact me so a solution can be worked out.
If you have trouble and can't get things going, be sure you have
some basic info before you contact me, such as what type of system you
are using, what type of memory buffer you are using, what types of
programs you have resident, what programs you are using, and when the
problems occur. With this information I can generally determine what
the problem is, and find a way to get PRINDIR to work for you!
KNOWN CONFLICTS:
PRINDIR cannot redirect programs which bypass the BIOS and access
hardware directly. PRINDIR intercepts all devices at the BIOS level,
but there is no easy way to intercept direct hardware writes.
PRINDIR has been tested under MS-DOS Versions 3.30, 4.01, AND 5.00
Page - 11
JMAC PRINDIR Version 8.00 Users Guide and Reference Manual
PRINDIR Version 8.00 Official Registration Form
Please mail this form to:
J.M. Allen Creations
115 Lynn Street
Fremont, Ohio 43420
Please make any check or money orders payable to J.M. Allen Creations.
First time registration is $20.00. Registered users of any previous
version of PRINDIR may upgrade to PRINDIR version 8.00 for only $5.00.
Name _________________________________________________________________
Title ________________________________________________________________
Company Name _________________________________________________________
Address ______________________________________________________________
City _____________________ State ___________ Zip _____________
Daytime Phone _______________________ Fax ________________________
Compuserve Mail _____________________ GEnie Mail _________________
_____ New Registrations at $20.00 Each = $__________
_____ Upgrade Registrations at $5.00 Each = $__________
Total Cost = $__________
[ ] I have enclosed a check or money order for the total
[ ] Charge the credit card below for the total (signature required)
[ ] I registered by phone with a credit card (signature required)
CREDIT CARD NUMBER (13 or 16 digits) EXPIRES
VISA/MASTERCARD ONLY!
__ __ __ __ - __ __ __ __ - __ __ __ __ - __ __ __ __ __ __ / __ __
AUTHORIZED SIGNATURE _______________________________________
Page - 12